package actorservice

import "wzgames/pkg/actor/actor"

type IServiceMeta interface {
	Init(name, addr string)
	GetName() string
	GetAddr() string
	GetPID() *actor.PID
	SetPID(pid *actor.PID)
	Attach(tag interface{})
	Attachment() interface{}
}

type ServiceMeta struct {
	Name   string
	Addr   string
	Pid    *actor.PID
	SuperV interface{}
}

func (s *ServiceMeta) Init(name, addr string) {
	s.Name = name
	s.Addr = addr
}

func (s *ServiceMeta) GetName() string {
	return s.Name
}

func (s *ServiceMeta) GetAddr() string {
	return s.Addr
}

func (s *ServiceMeta) SetPID(pid *actor.PID) {
	s.Pid = pid
}

func (s *ServiceMeta) GetPID() *actor.PID {
	return s.Pid
}

func (s *ServiceMeta) Attachment() interface{} {
	return s.SuperV
}

func (s *ServiceMeta) OnInit() {

}

func (s *ServiceMeta) OnDestroy() {

}
